From: Georges Basile Stavracas Neto Date: Fri, 15 Jan 2021 11:00:50 +0000 (-0300) Subject: workspacesView/workspacesDisplay: Remove parent opacity hack X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~400 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a9f11b1f5a3e9;p=gnome-shell.git workspacesView/workspacesDisplay: Remove parent opacity hack Now, we set WorkspacesDisplay's opacity directly, so there's no need to have this parent → child glue code anymore. Remove it. Part-of: --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index dc875e5e8..802d15eed 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -550,7 +550,6 @@ class WorkspacesDisplay extends St.Widget { this._workspacesOnlyOnPrimaryChanged.bind(this)); this._workspacesOnlyOnPrimaryChanged(); - this._notifyOpacityId = 0; this._restackedNotifyId = 0; this._scrollEventId = 0; this._keyPressEventId = 0; @@ -564,13 +563,6 @@ class WorkspacesDisplay extends St.Widget { } _onDestroy() { - if (this._notifyOpacityId) { - let parent = this.get_parent(); - if (parent) - parent.disconnect(this._notifyOpacityId); - this._notifyOpacityId = 0; - } - if (this._parentSetLater) { Meta.later_remove(this._parentSetLater); this._parentSetLater = 0; @@ -802,34 +794,6 @@ class WorkspacesDisplay extends St.Widget { return this._getPrimaryView().getActiveWorkspace().hasMaximizedWindows(); } - vfunc_parent_set(oldParent) { - if (oldParent && this._notifyOpacityId) - oldParent.disconnect(this._notifyOpacityId); - this._notifyOpacityId = 0; - - if (this._parentSetLater) - return; - - this._parentSetLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => { - this._parentSetLater = 0; - let newParent = this.get_parent(); - if (!newParent) - return; - - // This is kinda hackish - we want the primary view to - // appear as parent of this, though in reality it - // is added directly to Main.layoutManager.overviewGroup - this._notifyOpacityId = newParent.connect('notify::opacity', () => { - let opacity = this.get_parent().opacity; - let primaryView = this._getPrimaryView(); - if (!primaryView) - return; - primaryView.opacity = opacity; - primaryView.visible = opacity != 0; - }); - }); - } - _onRestacked(overview, stackIndices) { for (let i = 0; i < this._workspacesViews.length; i++) this._workspacesViews[i].syncStacking(stackIndices);